package com.xingjiejian.lambda.demo3;

import java.util.function.Consumer;

/**
 * @author Xing Jiejian 2019-12-26
 */
public class DemoConsumer {
    private static void consumerString(Consumer<String> con) {
        con.accept("Hello");
    }

    public static void main(String[] args) {
        //consumerString(s -> System.out.println(s));

        // 可以继续简化Lambda
        consumerString(System.out::println);
    }
}
